package com.ervanalb.cellradio.shared.communicator.packets;

import java.nio.ByteBuffer;

public class AuthenticatedData {
	public byte success;
	
	public AuthenticatedData(ByteBuffer bb)
	{
		success=bb.get();
	}
	
	public int size()
	{
		return 1;
	}

	public AuthenticatedData(byte success) {
		this.success=success;
	}
	
	public PacketData pack()
	{
		ByteBuffer bb=ByteBuffer.allocate(1);
		bb.put(success);
		bb.rewind();
		return new PacketData(PacketData.TYPE_AUTHENTICATED,bb);
	}
}
